package com.cross.test;

import java.util.ArrayList;
import java.util.List;

import junit.framework.TestCase;

import com.cross.cache.SimpleSelectFieldCacheWriter;
import com.cross.core.Reader;
import com.cross.core.SimpleTractor;
import com.cross.core.Writer;
import com.cross.excel.SimpleExcelReader;

public class SimpleSelectFieldCacheWriterTestCase extends TestCase {

	public void testReader() {
		String src = "d:\\test\\jdbc.xls";
		try {
			Reader reader = new SimpleExcelReader(src);
			List<String> selectField = new ArrayList<String>();
			List<String> result = new ArrayList<String>();
			Writer writer = new SimpleSelectFieldCacheWriter(reader.getHeader(), selectField, result);
			new SimpleTractor(reader, writer).start();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
